package study06;

class Person{
    private String name;
    private int age;

    void setName(String n){
        name = n;
    }

    void setAge(int a){
        age = a;
    }

    void display(){
        System.out.println("姓名："+  name + "\n" + "年龄：" + age);
    }
}

/**
 * @author GZQ
 * @Date 2023/11/23
 */

public class Example04 {
    public static void main(String[] args) {
        Person p = new Person();
        p.setName("李小雅");
        p.setAge(21);
        p.display();
    }
}
